#include "RandomNumberGenerator.h"

RandomNumberGenerator::RandomNumberGenerator()
{
	Seed(1);
	//Seed(time(NULL));
}
int RandomNumberGenerator::TheRandFunc() // the random function to use
{
	return rand();
}

void RandomNumberGenerator::Seed(unsigned int i)
{
	srand(i);
}

int RandomNumberGenerator::CoinFlip()
{
	return TheRandFunc()%2;
}

int RandomNumberGenerator::GetRand(int i)
{
	return TheRandFunc()%i;
}

float RandomNumberGenerator::GetRand(float f)
{
	return fmod(TheRandFunc(),f);
}